home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / program / amos / amoslist.lzh / AMOSLIST / 000331_amos-request@svcs1.digex.net_Tue Sep 26 05:11:23 1995.msg < prev    next >
Internet Message Format  |  1995-10-02  |  3KB

  1. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224]) by mail1.access.digex.net (8.6.12/8.6.12) with ESMTP id FAA04278;  for <mcox@access.digex.net> ; Tue, 26 Sep 1995 05:11:23 -0400
  2. Received: (from daemon@localhost) by svcs1.digex.net (8.6.12/8.6.12) id DAA08585 for amos-out; Tue, 26 Sep 1995 03:30:56 -0400
  3. Received: from mail1.access.digex.net (mail1.access.digex.net [205.197.247.2]) by svcs1.digex.net (8.6.12/8.6.12) with ESMTP id DAA08582 for <amos-list@svcs1.digex.net>; Tue, 26 Sep 1995 03:30:55 -0400
  4. Received: from red.paston.co.uk (red.paston.co.uk [194.129.188.3]) by mail1.access.digex.net (8.6.12/8.6.12) with SMTP id DAA29988;  for <amos-list@access.digex.net> ; Tue, 26 Sep 1995 03:30:50 -0400
  5. Received: from localhost (bwyatt.paston.co.uk) by red.paston.co.uk (5.x/SMI-SVR4)
  6.     id AA00899; Tue, 26 Sep 1995 08:23:24 +0100
  7. Received: by paston.co.uk.uucp (V1.16/Amiga)
  8.     id AA001xa; Tue, 26 Sep 95 12:23:17 GMT
  9. Date: Tue, 26 Sep 95 12:23:17 GMT
  10. Message-Id: <9509261223.AA001x9@paston.co.uk.uucp>
  11. In-Reply-To:  <9509252115.aa12946@agora.stm.it>
  12.              (from M.Berionne@agora.stm.it)
  13.              (on Mon, 25 Sep 95 21:13:00)
  14. Lines: 53
  15. X-Mailer: ADMail 1.5 Copyright 1995 S.T.Brown
  16. From: bwyatt@paston.co.uk (Ben Wyatt)
  17. To: amos-list@access.digex.net
  18. Subject: Re: Help me!
  19. Status: RO
  20. X-Status: 
  21.  
  22. Greetings M.Berionne@agora.stm.it, you wrote some text on the subject Help
  23. me!, and now I'm going to answer it.
  24.  
  25. M> I have to solve a problem in AMOS Pro programming: is there anyone who can
  26. M> help me??
  27. M> I explain the problem.
  28. M> I must (or better, I want to) do a procedure to draw on a screen a part of
  29. M> 
  30. M> a
  31. M> circle. Is there any extension to do it??
  32. M> Otherwise I have to use sin() and cos() function, but these are relly very
  33. M> slow.
  34. M> The procedure should be like:
  35. M> 
  36. M> Procedure PART_OF_CIRCLE[R,A,B]
  37. M>      where R is the radius, A the value of the angle in degree
  38. M>      and B is how many degrees the line is long
  39. M>      (sorry for my English, can you understand me? :-(( )
  40. M> End Proc
  41. M> 
  42. M> Unfortunately, becouse of all the structure of the program, the screen is
  43. M> in
  44. M> Hi resolution, but you have just to use R/2 in the sin() part.
  45. M> But the biggest matter is that the 0 degree must be at 12 o'clock, 90
  46. M> degrees at 3 o'clock and so on in clockwise (instead the trig functions
  47. M> work
  48. M> in the other direction.).
  49. M> Finally, it must be fast enough, even if not just like the Circle command
  50. M> (or Fcircle by Turbo extension!).
  51.  
  52. AT LAST! An interesting problem!
  53.  
  54. This should do it:
  55.  
  56. Procedure _PART_OF_CIRCLE[R,A,B,X,Y,STP]
  57.    Gr Locate X+Sin(A)*R,Y-Cos(B)*R
  58.    For N=A+STP To A+B Step STP
  59.       Draw To X+Sin(N)*R,Y-Cos(N)*R
  60.    Next N
  61. EndProc
  62.  
  63. Where:
  64.   R=Radius
  65.   A=Start angle
  66.   B=Degrees to rotate
  67. X+Y=Centre of circle
  68. STP=Accuracy (small=slow but accurate, large=fast but less accurate)
  69.     Use about 4-5, depending on the size of the circle.
  70.  
  71. Bye  _________________________________
  72.     /                                 \
  73.     > Ben Wyatt - bwyatt@paston.co.uk <
  74.     \_________________________________/ ï¿½1995 Very Interesting Signatures